package cn.house.rent.utils;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

	// 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2021000119687642";
	
	// 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCqhLlWg8Je3zzMrCwEF/UCTFBdDsLU9kuRSSrHa6Fd5hIl9CV2moTwa4PmVuSXvCIrK4mFCyuivoGLPMv6Jph4dCuFcIapdbisAhrTc0sm+6uVFd1ty5Vz7gg1x3uTj9EHT/LCmmN78KQPi+J0NfeefSs3oGG5DNsvzwfBXAndWgOKx7GqG0fxR3OiwltMPY7gD2qpotACJ9FT9uP/ktMrDk4/9p19QmwWQyVOmrfQMhI3LtjbW5pbC+NhliEBYdYZ6Pd+eklgaUoFSnpgWWuYvGl6HG5bwPla4AV9K2eM73IL3SiF01v+y0ud/yiNRIkOI3ERyBBHvjOpRvPW3ZOtAgMBAAECggEAKOi8ulfUCwTNxmDMEpNY0ZtTcG/5KDSKvqlqHPvic++djQN89W5u1GtG8r0IDKszG15PmN6sMlg4JhqI6VPXIpbkVhhABmnay1GZ8/7mGc0pRhQ/0naUPYLu71ATgrxvLqzslemKUpLSGXS6+Jx18s0e0DKnH0lJULf/qVEWgMcReFTqzANTCYWw8KT6ePb8/ubhJbBA80B9WS1qfd+MQ2ynLSQsEb+OTr/slfjIROnJaBvejAGU8Rqx24lZJYUjlVa7fqgW4HpLxRjHmplEjckoAttuSjBQUJimCiUAcxgiAakAGJj6RdgObYefRQB2PcWCT7X6ojKxmFoNRDWKgQKBgQDwDNfMMVecJ0v8AXNRt3zNb6tB9Kqo0w7FncNF+pj2SGDDnJcRhj4EZYydpBESvxdAMoDg9ve2F3FFneRZX3/MiktSXoUQEgIks2/mMfhg0XtgnoqJjBETgLA/D9rKymU6aDXfgFd5OiBtzxmfa/tVEbf4gWPbMjlm5vAPwC9NjQKBgQC12Syog3WlwDve8w+3HUCzA9u3T4bWSZCkhch85br/C5h6s5nAQ3unEhdWJ5fB267Zm3pT61tUByvqmEiaoaJTHWCCX3r0XAtYMbiBd5WhTa6VF+MW0bI79/d+nGruM0hOgJ1foJFQm9O+7Z6lytE3ysv0vgqFan0RvqYwoB6GoQKBgQCs3AK1xr5Y8y9TXFQHf0L+yLAhQad3BOz5Px70EH3/s6UCl4ttkiaskdfNWOz2e+apUvTditpcJMtrn0RlW1CzIM8WlHvrU5x5g0FMGaXLSm426FPIsrVFPwErmCYsq8xzX8GTnV7gLAxYJq9DzsVgv+6jo8EdgjA1uo0aOoGVrQKBgQCW+JM738/naP4LrY1pf868EEL0IAEYnICKJkt5bZxeq7jOfZby6NOas8lODJbQKdsy7AKV8zqiO0X5gK4eOnyyNhxugGhqwJPmh3jfe3FtNjnvq6IryrIHWWlO4vtfgJHSIrMEtiCOZKBZzZq9l/E0OZg0OyYu92aYOchtbDGLoQKBgACpNWgJ0CCByL40tBTr/RnQJrCJqjWb9sYdrmY+FvhlJEpIEnsg92UAP8WXAsMAmR6koJ1mEKuBB1R/MvAO4lZDv9CMT9c35i2q0355YjBH+wMLaKUULdcbz1Jn7Khj4CA6VT3zBjLFPdzrcMX3FMzv0vm5TLzlligD9uiJGV5K";
	
	// 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqoS5VoPCXt88zKwsBBf1AkxQXQ7C1PZLkUkqx2uhXeYSJfQldpqE8GuD5lbkl7wiKyuJhQsror6BizzL+iaYeHQrhXCGqXW4rAIa03NLJvurlRXdbcuVc+4INcd7k4/RB0/ywppje/CkD4vidDX3nn0rN6BhuQzbL88HwVwJ3VoDisexqhtH8UdzosJbTD2O4A9qqaLQAifRU/bj/5LTKw5OP/adfUJsFkMlTpq30DISNy7Y21uaWwvjYZYhAWHWGej3fnpJYGlKBUp6YFlrmLxpehxuW8D5WuAFfStnjO9yC90ohdNb/stLnf8ojUSJDiNxEcgQR74zqUbz1t2TrQIDAQAB";

	// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String notify_url = "http://95z8kq.natappfree.cc/notify_url.jsp";

	// 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://localhost:8080/houseRentSys/order/returnUrl";

	// 签名方式
	public static String sign_type = "RSA2";
	
	// 字符编码格式
	public static String charset = "utf-8";
	
	// 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";
	
	// 支付宝网关
	public static String log_path = "C:\\";


    /** 
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

